set nocompatible
filetype off "Required by vundle

let mapleader = ","
let g:mapleader = ","

filetype plugin indent on
set hlsearch
set ignorecase
set smartcase
set enc=utf-8
set fileencoding=utf-8
set laststatus=2
set t_Co=256
set colorcolumn=95
set number
set relativenumber
set expandtab
set smartindent
set softtabstop=2
set shiftwidth=2
set mouse=a
set backspace=indent,eol,start
set cursorline 
set guifont=Monaco:h10


"==================="
"程序开发相关的设置"
"==================="
"(1)使用%来选择语句块，然后使用快捷键zf来折叠"
set foldmethod=marker
"(2)注释：选中文本后，输入;c即可注释，输入;u 即可取消注释"
vmap <silent> ;c :s/^/\/\//<CR>:noh<CR>
vmap <silent> ;u :s/\/\///<CR>:noh<CR>

"============"
"多窗口操作"
"============"
map <C-l> <C-W>l
map <C-h> <C-W>h
map <C-j> <C-W>j
map <C-k> <C-W>k

"=========================="
"不要交换文件和备份文件，减少冲突"
"=========================="
set noswapfile
set nobackup
set nowritebackup

"============="
"查找和替换文本"
"============="
nmap ;s :%s/\<<C-R>=expand("<cword>")<CR>\>/
nmap ;g :vimgrep <C-R>=expand("<cword>")<CR> */*.*

"========================"
"快捷文本输入"
"========================"
map <silent>  \d a<C-R>=strftime("%Y/%m/%d %A")<CR> 
map <silent>  \t a<C-R>=strftime("%Y/%m/%d %H:%M:%S")<CR>
map <silent>   ,d :split ~/Dropbox/Doc/ <CR>
iab --l  --------------------
iab ==l  ====================


nnoremap <silent> <leader>/ :nohlsearch<CR>
inoremap jj <Esc>
nnoremap H 0
nnoremap L $